package de.esk.fraunhofer.View.ECar;


import android.content.Context;
import android.preference.Preference;
import android.util.AttributeSet;
import android.view.View;
import android.widget.TextView;
import de.esk.fraunhofer.R;

public class PreferenceWithTextView extends Preference{
	private String s;
    // This is the constructor called by the inflater
    public PreferenceWithTextView(Context context, AttributeSet attrs) {
        
    	super(context, attrs);        
        setWidgetLayoutResource(R.layout.preference_with_textview);     
    }
    
    @Override
    protected void onBindView(View view) {
        super.onBindView(view);        
        // Set our custom views inside the layout        
        final TextView myTextView = (TextView) view.findViewById(R.id.textview_in_preference);
        if (myTextView != null) 
            myTextView.setText(s);        
    }
    
    public void setText(String s){
    	this.s=s;
    }
}
